import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
import Login from '@/pages/login/index.vue';
import Home from '@/pages/home/index.vue';
import { App } from 'vue';
const routes: RouteRecordRaw[] = [
  {
    path: '/login',
    component: Login,
  },
  {
    path: '/',
    component: Home,
  },
];

export const router = createRouter({
  routes,
  history: createWebHashHistory(),
});

export function setupRouter(app: App) {
  app.use(router);
  // 创建路由守卫
}

export default router;
